Find<TQuery,TResult>(DicomScp,TQuery,BeforeAddTagDelegate,DicomMatchDelegate<TResult>) Method

Summary

Sends a C-FIND-REQ message to a peer member of a connection defined by Scp. The C-FIND-REQ is defined by the Query parameter.

Syntax
C#
VB
C++
public void Find<TQuery, TResult>( 
   DicomScp Scp, 
   TQuery Query, 
   BeforeAddTagDelegate OnBeforeAdd, 
   DicomMatchDelegate<TResult> OnMatch 
) 
  
Public Overloads Sub Find 
    (Of TQuery,_TResult_)( _ 
   ByVal Scp As DicomScp, _ 
   ByVal Query As TQuery, _ 
   ByVal OnBeforeAdd As BeforeAddTagDelegate, _ 
   ByVal OnMatch As DicomMatchDelegate(Of TResult) _ 
)  
public: 
void Findgeneric<typename TQuery> 
generic<typename TResult> 
(  
   DicomScp^ Scp, 
   _TQuery^_ Query, 
   BeforeAddTagDelegate^ OnBeforeAdd, 
   DicomMatchDelegate<TResult^>^ OnMatch 
)  

Parameters

Scp
The peer connection to send the C-FIND-REQ to.

Query
The query information that describes the DICOM datasets to be found.

OnBeforeAdd
The method to call before a property defined in the class Query is added to the dataset.

OnMatch
The delegate to be called for each dataset that matches the query parameters.

Type Parameters

TQuery
The type of the query.

TResult
The type of the result.

Remarks

A DicomDataSet will be created from the Query parameter. This DicomDataSet will then be sent in the C-FIND-RQ. The Query class should be decorated with the correct attributes for creating the dataset (described in more detail below). The OnBeforeAdd delegate will be called before a tag is added to the dataset.

The Query argument determines the command and data elements of the C-FIND-RQ.

The sample class MyModalityWorklistQuery below shows examples of the attributes.

C#
 [Instance(DicomClassType.ModalityWorklist,DicomUidType.ModalityWorklistFind)] 
    public class MyModalityWorklistQuery 
    { 
        private PersonName _PatientName = new PersonName(); 
 
        [Element(DicomTag.PatientName)] 
        [TypeConverter(typeof(PersonNameConverter))] 
        public PersonName PatientName 
        { 
            get { return _PatientName; } 
            set { _PatientName = value; } 
        } 
 
        private string _PatientId = string.Empty; 
 
        [Element(DicomTag.PatientID)] 
        public string PatientId 
        { 
            get { return _PatientId; } 
            set { _PatientId = value; } 
        } 
        ... 
    } 
VB
 <Instance(DicomClassType.ModalityWorklist,DicomUidType.ModalityWorklistFind)> _ 
 Public Class MyModalityWorklistQuery 
		Private _PatientName As New PersonName() 
 
		<Element(DicomTag.PatientName), TypeConverter(GetType(PersonNameConverter))> _ 
		Public Property PatientName() As PersonName 
			Get 
				Return _PatientName 
			End Get 
			Set(ByVal value As PersonName) 
				_PatientName = value 
			End Set 
		End Property 
 
		Private _PatientId As String = String.Empty 
 
		<Element(DicomTag.PatientID)> _ 
		Public Property PatientId() As String 
			Get 
				Return _PatientId 
			End Get 
			Set(ByVal value As String) 
				_PatientId = value 
			End Set 
		End Property 
	   Private ... 
 End Class 

The class level Instance attribute should be included to specify a DicomUidType (the SOP Class of the DICOM find) and an associated DicomClassType that is used to create an internal DicomDataSet that specifies the data set component of the C-FIND-RQ. The elements in the internal DicomDataSet correspond to the data you wish to find.

For example, passing an instance of the MyModalityWorklistQuery class below would result in a C-FIND-RQ command set specifying:

(0000,0002) Affected SOP Class UID 1.2.840.10008.5.1.4.31 (Modality Worklist Information Model - FIND)

If the class level Instance attribute is not specified, then the Find SOP Class defaults to DicomUidType.StudyRootQueryFind

Example values for the Instance attribute pairs are shown below:

DicomUidType UID DicomClassType
DicomUidType.PatientRootQueryFind 1.2.840.10008.5.1.4.1.2.1.1 DicomClassType.PatientRootQueryPatient
DicomClassType.PatientRootQueryStudy
DicomClassType.PatientRootQuerySeries
DicomClassType.PatientRootQueryImage
DicomUidType.StudyRootQueryFind 1.2.840.10008.5.1.4.1.2.2.1 DicomClassType.StudyRootQueryStudy
DicomClassType.StudyRootQuerySeries
DicomClassType.StudyRootQueryImage
DicomUidType.ModalityWorklistFind 1.2.840.10008.5.1.4.31 DicomClassType.ModalityWorklist
DicomUidType.GeneralPurposeWorklistFind 1.2.840.10008.5.1.4.32.1 DicomClassType.GeneralPurposeWorklist
DicomUidType.HangingProtocolInformationModelFind 1.2.840.10008.5.1.4.38.2 DicomClassType.HangingProtocolInformationModelFind

An Element attribute can be included to map a class member to a DICOM element. Note that in the MyModalityWorklistQuery class, the PatientId member is decorated with an Element attribute that associates it with the DicomTag.PatientID. For example, if the PatientId member of the MyModalityWorklistQuery object contains "123", then the dataset component of the C-FIND-RQ will contain

(0010,0020) Patient ID 123

If the PatientId member of the MyModalityWorklistQuery object is empty, then no corresponding DICOM element will be added to the dataset component of the C-FIND-RQ.

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom.Scu Assembly